/***************************************************************************
 创建者: 华磊
 开始时间: 2018.8.14
 copyright: (C) 华友高科
 修改说明: (每次有修改就添加一条，带有 修改人，修改时间，修改描述)
 example (1) hualei 2017.5.8 类的具体实现代码编写

 ***************************************************************************/
#include "pointdata.h"


PointData::PointData()
{
    versionInfo.componentName="PointData";
    versionInfo.componentVersion="V1.0";
    versionInfo.publishDate="2018.10.27";
}

int PointData::readVersion(std::vector <ComponentVersion> &componentVersionList)
{
    componentVersionList.push_back(versionInfo);
    return 1;
}

void PointData::savePoint2List(QVector<PointPro> parsePointList)
{
    pointProList = parsePointList;
    return;

    for(int i = 0; i < pointProList.size();i++)
    {
        std::cout << "i = ******"<<i<<"===jointFlag==="<<pointProList[i].jointFlag
                  <<"------pointNum-----"<<pointProList[i].pointNum
                 <<"------groupNum-----"<<pointProList[i].groupNum
                <<"------ufValue-----"<<pointProList[i].ufValue
               <<"------utValue-----"<<pointProList[i].utValue
              <<"------recordStatus-----"<<pointProList[i].recordStatus
             <<"------configString-----"<<pointProList[i].configString<<std::endl;
        for(int j = 0; j < pointProList[i].configInt.size();j++)
        {
            std::cout << "====configInt===="<<pointProList[i].configInt[j];
        }
        std::cout<<std::endl;
        for(int j = 0; j < pointProList[i].positionValue.size();j++)
        {
            std::cout << "====positionValue===="<<pointProList[i].positionValue[j];
        }
        std::cout<<std::endl;
    }
    return;
}

void PointData::savePalletPoint2List(QVector<StackInfo> parsePalletList)
{
    basePalletList = parsePalletList;
//    return;

//    for(int i = 0; i < basePalletList.size();i++)
//    {
//        std::cout << "i = ******"<<i<<"===stackName==="<<basePalletList[i].stackName
//                  <<"------stackUpDown-----"<<basePalletList[i].stackUpDown
//                 <<"------row-----"<<basePalletList[i].row
//                <<"------col-----"<<basePalletList[i].col
//               <<"------layer-----"<<basePalletList[i].layer
//              <<"------execIncr-----"<<basePalletList[i].execIncr
//             <<"------auxiliary-----"<<basePalletList[i].auxiliary
//            <<"------execOrder-----"<<basePalletList[i].execOrder
//           <<"------teachOrder-----"<<basePalletList[i].teachOrder
//          <<"------stackType-----"<<basePalletList[i].stackType
//         <<"------stackNumber-----"<<basePalletList[i].stackNumber
//        <<"------stackProximityCount-----"<<basePalletList[i].stackProximityCount
//        <<"------stackFleeCount-----"<<basePalletList[i].stackFleeCount
//        <<"------stackStyleCount-----"<<basePalletList[i].stackStyleCount
//        <<"------stackRegisterNumber-----"<<basePalletList[i].stackRegisterNumber
//        <<"------stackPointCount-----"<<basePalletList[i].stackPointCount<<std::endl;

//        for(int j = 0; j < basePalletList[i].intervalEnable.size();j++)
//        {
//            std::cout << "===intervalEnable===="<<basePalletList[i].intervalEnable[j];
//        }
//        std::cout<<std::endl;
//        for(int j = 0; j < basePalletList[i].intervalValue.size();j++)
//        {
//            std::cout << "===intervalValue===="<<basePalletList[i].intervalValue[j];
//        }
//        std::cout<<std::endl;

//        for(int j = 0;j < basePalletList[i].stackPointA_n.size();j++)
//        {
//            std::cout << "j = ***A_n***"<<j<<"===jointFlag==="<<basePalletList[i].stackPointA_n[j].jointFlag
//                      <<"------pointNum-----"<<basePalletList[i].stackPointA_n[j].pointNum
//                     <<"------groupNum-----"<<basePalletList[i].stackPointA_n[j].groupNum
//                    <<"------ufValue-----"<<basePalletList[i].stackPointA_n[j].ufValue
//                   <<"------utValue-----"<<basePalletList[i].stackPointA_n[j].utValue
//                  <<"------recordStatus-----"<<basePalletList[i].stackPointA_n[j].recordStatus
//                 <<"------configString-----"<<basePalletList[i].stackPointA_n[j].configString<<std::endl;
//            for(int k = 0; k < basePalletList[i].stackPointA_n[j].configInt.size();k++)
//            {
//                std::cout << "====configInt===="<<basePalletList[i].stackPointA_n[j].configInt[k];
//            }
//            std::cout<<std::endl;
//            for(int k = 0; k < basePalletList[i].stackPointA_n[j].positionValue.size();k++)
//            {
//                std::cout << "====positionValue===="<<basePalletList[i].stackPointA_n[j].positionValue[k];
//            }
//            std::cout<<std::endl;
//        }

//        std::cout << "i = ***btm***"<<i<<"===jointFlag==="<<basePalletList[i].stackPointBTM.jointFlag
//                  <<"------pointNum-----"<<basePalletList[i].stackPointBTM.pointNum
//                 <<"------groupNum-----"<<basePalletList[i].stackPointBTM.groupNum
//                <<"------ufValue-----"<<basePalletList[i].stackPointBTM.ufValue
//               <<"------utValue-----"<<basePalletList[i].stackPointBTM.utValue
//              <<"------recordStatus-----"<<basePalletList[i].stackPointBTM.recordStatus
//             <<"------configString-----"<<basePalletList[i].stackPointBTM.configString<<std::endl;
//        for(int k = 0; k < basePalletList[i].stackPointBTM.configInt.size();k++)
//        {
//            std::cout << "====configInt===="<<basePalletList[i].stackPointBTM.configInt[k];
//        }
//        std::cout<<std::endl;
//        for(int k = 0; k < basePalletList[i].stackPointBTM.positionValue.size();k++)
//        {
//            std::cout << "====positionValue===="<<basePalletList[i].stackPointBTM.positionValue[k];
//        }
//        std::cout<<std::endl;

//        for(int j = 0;j < basePalletList[i].stackPointR_n.size();j++)
//        {
//            std::cout << "j = **R_n****"<<j<<"===jointFlag==="<<basePalletList[i].stackPointR_n[j].jointFlag
//                      <<"------pointNum-----"<<basePalletList[i].stackPointR_n[j].pointNum
//                     <<"------groupNum-----"<<basePalletList[i].stackPointR_n[j].groupNum
//                    <<"------ufValue-----"<<basePalletList[i].stackPointR_n[j].ufValue
//                   <<"------utValue-----"<<basePalletList[i].stackPointR_n[j].utValue
//                  <<"------recordStatus-----"<<basePalletList[i].stackPointR_n[j].recordStatus
//                 <<"------configString-----"<<basePalletList[i].stackPointR_n[j].configString<<std::endl;
//            for(int k = 0; k < basePalletList[i].stackPointR_n[j].configInt.size();k++)
//            {
//                std::cout << "====configInt===="<<basePalletList[i].stackPointR_n[j].configInt[k];
//            }
//            std::cout<<std::endl;
//            for(int k = 0; k < basePalletList[i].stackPointR_n[j].positionValue.size();k++)
//            {
//                std::cout << "====positionValue===="<<basePalletList[i].stackPointR_n[j].positionValue[k];
//            }
//            std::cout<<std::endl;
//        }

//        for(int j = 0; j < basePalletList[i].stackStylePointInfo.size();j++)
//        {
//            std::cout << "j====="<<j<<std::endl;

//            for(int k = 0; k < basePalletList[i].stackStylePointInfo[j].rowColumnLayer.size();k++)
//            {
//                std::cout << "===rowColumnLayer===="<<basePalletList[i].stackStylePointInfo[j].rowColumnLayer[k];
//            }
//            std::cout<<std::endl;

//            std::cout << "j = **stackStylePointInfo****"<<j<<"===jointFlag==="<<basePalletList[i].stackStylePointInfo[j].stackPoint.jointFlag
//                      <<"------pointNum-----"<<basePalletList[i].stackStylePointInfo[j].stackPoint.pointNum
//                     <<"------groupNum-----"<<basePalletList[i].stackStylePointInfo[j].stackPoint.groupNum
//                    <<"------ufValue-----"<<basePalletList[i].stackStylePointInfo[j].stackPoint.ufValue
//                   <<"------utValue-----"<<basePalletList[i].stackStylePointInfo[j].stackPoint.utValue
//                  <<"------recordStatus-----"<<basePalletList[i].stackStylePointInfo[j].stackPoint.recordStatus
//                 <<"------configString-----"<<basePalletList[i].stackStylePointInfo[j].stackPoint.configString<<std::endl;

//            for(int m = 0; m < basePalletList[i].stackStylePointInfo[j].stackPoint.positionValue.size();m++)
//            {
//                std::cout << "===m==="<<m<<"=====point======"<<basePalletList[i].stackStylePointInfo[j].stackPoint.positionValue[m]<<"\n\n";
//            }
//        }
//    }
}
